//
//  WeatherModel.m
//  DayDayRun
//
//  Created by 卫建 on 16/1/7.
//  Copyright © 2016年 卫建. All rights reserved.
//

#import "WeatherModel.h"

@implementation WeatherModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

#pragma mark------归档的时候执行的方法
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.date forKey:@"date"];
    [aCoder encodeObject:self.fengli forKey:@"fengli"];
    [aCoder encodeObject:self.fengxiang forKey:@"fengxiang"];
    [aCoder encodeObject:self.high forKey:@"high"];
    [aCoder encodeObject:self.low forKey:@"low"];
    [aCoder encodeObject:self.type forKey:@"type"];
}

#pragma mark------反归档时需要执行的方法
-(instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self)
    {
        self.date = [aDecoder decodeObjectForKey:@"date"];
        self.fengli = [aDecoder decodeObjectForKey:@"fengli"];
        self.fengxiang = [aDecoder decodeObjectForKey:@"fengxiang"];
        self.high = [aDecoder decodeObjectForKey:@"high"];
        self.low = [aDecoder decodeObjectForKey:@"low"];
        self.type = [aDecoder decodeObjectForKey:@"type"];
    }
    return self;
}



@end
